using System;
using System.Collections.Generic;
using System.Text;

namespace DemonHunter
{
    /// <summary>
    ///  Container class holding list of sounds, and xLocation to signal start of event
    ///  and a file in which the data is held in.
    /// </summary>
    class Event
    {
        public const int EVENT_SKELETON = 0;
        public const int EVENT_MINOTAUR = 1;
        public const int EVENT_BOLT = 2;
        public const int EVENT_COWS = 3;
        public const int EVENT_BIKER = 4;
        public const int EVENT_PORTAL = 5;

        private double eventXLoc;
        private int eventType;

        public void setType(int type) { eventType = type; }
        public double getEventxLoc() { return eventXLoc; }

        public void setEventxLoc(double newXLoc) 
        { 
            eventXLoc = newXLoc;
        }

        public void Execute()
        {
            Entity e;

            if (eventType == EVENT_SKELETON)
            {
                e = new Skeleton();
                Level.GetInstance().AddEntity(e);
            }
            else if (eventType == EVENT_MINOTAUR)
            {
                e = new Minotaur();
                Level.GetInstance().AddEntity(e);
            }
            else if (eventType == EVENT_BOLT)
            {
                e = new LightneningBolt();
                Level.GetInstance().AddEntity(e);
            }
            else if (eventType == EVENT_COWS)
            {
                e = new BackgroundCows();
                Level.GetInstance().AddEntity(e);
            }
            else if (eventType == EVENT_BIKER)
            {
                e = new BikerDemon();
                Level.GetInstance().AddEntity(e);
            }
            else if (eventType == EVENT_PORTAL)
            {
                e = new Portal();
                Level.GetInstance().AddEntity(e);
            }
        }
    }
}
